package com.woniu.mgr.controller;


import com.woniu.mgr.common.Result;
import com.woniu.mgr.controller.form.LoginForm;
import com.woniu.mgr.service.ManagerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 * 管理员表 前端控制器
 * </p>
 *
 * @author Silas
 * @since 2023-02-15
 */
@RestController
@RequestMapping("/manager")
@Slf4j
public class ManagerController {
    @Resource
    private ManagerService managerService;

    @PostMapping("/login")
    public Result login(@RequestBody LoginForm loginForm) {
        log.info("{}执行登陆操作");
        managerService.login(loginForm);
        return Result.success(200, "登录成功", null);
    }
}

